from base.myBase import Tools

class login_model(Tools):
    # 定义路径
    path = '/user/login'
    # 发送注册请求
    def login_action(self,usr,pwd,check='1234'):
        mydata = {
            "username": usr,
            "password": self.md5(text=pwd),
            "checkcode": check
        }
        res = self.huihua.post(url=self.hosturl+self.path, data=mydata)
        return res.json()

# import requests
# s = requests.session()
# reg = login_model(huihua=s)
# msg = reg.login_action(usr='nieryehhh',pwd='admin123')
# print( msg )
